<dt>
<a href="<?if(Zend_Auth::getInstance()->hasIdentity()):?><?= $this->url(array('controller' => 'users', 'action' => 'view', 
        'id' => Zend_Auth::getInstance()->getIdentity()->user_id), "", true);?><?endif;?>"><img src="<?=$this->baseUrl(); ?>/images/avatars/<?if (Zend_Auth::getInstance()->hasIdentity()):?><?= Zend_Auth::getInstance()->getIdentity()->user_avatar;?><?else:?>default<?endif;?>.jpg" alt="" /></a>
</dt>
<dd>
    <a class="welcome_user" href="<?= Zend_Auth::getInstance()->hasIdentity()? 
            $this->url(array('controller' => 'users', 'action' => 'view', 'id' => Zend_Auth::getInstance()->getIdentity()->user_id ), "", true):
            $this->url(array('controller' => 'users', 'action' => 'login'), "", true);?>">
            Кош келдиниз,
        <strong>
            <?if (Zend_Auth::getInstance()->hasIdentity()):?> 
                <?= Zend_Auth::getInstance()->getIdentity()->user_name;?>
            <?else:?> 
                Конок 
            <?endif;?>
        </strong>
    </a>
    
    
    <span class="log_data">Дата : <?= date("M d D Y");?></span>
    
    <?if (Zend_Auth::getInstance()->hasIdentity()):?>
        <a class="logout" href="<?= $this->url(array(
            'controller'    => 'users',
            'action'        => 'logout'
            ), "", true)?>">Чыгуу</a>
    <a class="user_messages" href="<?= $this->url(array('controller' => 'users', 'action' => 'message'), "", true);?>"><span><?= $this->messageCount;?></span></a>
        
    <?else:?>
        <a class="logout" href="<?= $this->url(array(
            'controller'    => 'users',
            'action'        => 'login'
            ), "", true)?>">Кирүү</a>
    <?endif;?>
    
</dd>